package org.yscz.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.yscz.common.enums.AlgResponseEnum;
import org.yscz.common.enums.MediaResponseEnum;

/**
 * @author achen
 * @create 2021-08-15 23:33
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class MediaCommandException extends RuntimeException {

    private Integer code;
    private String msg;

    public MediaCommandException(MediaResponseEnum mediaResponseEnum) {
        this.code = mediaResponseEnum.getCode();
        this.msg = mediaResponseEnum.getMsg();
    }
}
